package br.com.sgac.remote{
	
	import br.com.sgac.objetos.Medicamento;
	
	import mx.rpc.AsyncToken;
	import mx.rpc.Responder;
	
	public class remoteMedicamento extends Remote{
		public function remoteMedicamento()		{
			getInstance();
		}
		public function inserirMedicamento(result:Function,medicamento:Medicamento,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.inserirPaciente(medicamento);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarTodosMedicamento(result:Function,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarTodosMedicamentos();
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
		public function listarMedicamentos(result:Function,nomeMedicamento:String,source:String):void{
			_remote.source = source;
			var async:AsyncToken = _remote.listarMedicamentos(nomeMedicamento);
			async.addResponder(new Responder(result,defaultFaultHandler));
			
		}
	}
}